/**
 * DataItem.java
 * 2010-1-4
 */
package com.dlplay.flightinfo.data;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToOne;
import javax.persistence.Transient;

import com.google.appengine.api.datastore.Key;

/**
 * @author zhao yu
 *
 */
@Entity
@MappedSuperclass
public class DataEntryBase {
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Key key;
	
	private Date latestUpdate;
	
	
	public Key getKey() {
        return key;
    }
	
	@Transient
	public void setKey(Key key) {
        this.key = key;
    }

	@Column(name = "latestUpdate")
	public Date getLatestUpdate() {
		return latestUpdate;
	}
	public void setLatestUpdate(Date latestUpdate) {
		this.latestUpdate = latestUpdate;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "DataEntryBase [key=" + key + ", latestUpdate=" + latestUpdate
				+ "]";
	}
	
}
